package top.rule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import com.netflix.loadbalancer.RoundRobinRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Lisicheng
 */
@Configuration
public class MyRule {

    @Bean
    public IRule rule(){
        // 随机
        // return new RandomRule();
        // 轮询 默认
        return new RoundRobinRule();
    }

}
